import Vue from 'vue'

import ElementUI from 'element-ui'
import {Message} from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import XjrTable from "./components/XjrTable";
// import './element-variables.scss'
import {ajaxMins} from './utils/ajax'
import ajax from './utils/ajax'
// animate动画库
import 'animate.css'

import App from './App'
import router from './router'
import store from './store'
// 自定义的全局组件
import Notification from '@/components/notification'
import FaceCamera from "./components/face/FaceCamera";
// 国际化
import i18n from './lang'
// 全局权限检查
import './permission'
// 全局图标
import './icons'
import CommonUtil from './utils/CommonUtils'
// // 全局 Mock 接口
// import './mock'
Vue.use(CommonUtil);
Vue.use(ElementUI, {
  size: 'medium',
  i18n: (key, value) => i18n.t(key, value)
});
Vue.use(Notification);
Vue.use(ajaxMins);
Vue.mixin(ajax);
Vue.config.productionTip = false;
Vue.component('XjrTable',XjrTable);
Vue.component('FaceCamera',FaceCamera);
Vue.prototype.message=({message='',type='warning',onClose=()=>{}})=>{
  return Message({message,type,center:true,offset:250,onClose,duration:1000});
};
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  i18n,
  render: h => h(App)
})
